home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Alles Voor Internet / Tout Pour Internet
/
alles voor internet.iso
/
MacInternet™
/
Telnet
/
NCSA
/
tn3270 2.3d26 source
/
tn3270
/
bgproc.a
< prev
next >
Wrap
Text File
|
1991-05-26
|
5KB
|
171 lines
case yes
print sym
;
; tn3270 for the Macintosh Source Code
; Brown University Computing and Information Services
; Version 2.3d21, January 17, 1991
; Copyright (c) 1988, 1989, 1990, 1991 by Brown University and
; by Peter John DiCamillo.
;
; Permission is granted to any individual or institution to use, copy,
; or redistribute the binary version of this software and its
; documentation provided this notice and the copyright notices are
; retained. Permission is granted to any individual or non-profit
; institution to use, copy, modify, or redistribute the source files
; of this software provided this notice and the copyright notices are
; retained. This software may not be distributed for profit, either
; in original form or in derivative works, nor can the source be
; distributed to other than an individual or a non-profit institution.
; Any individual or group interested in seeing and/or using these
; source files but who are prevented from doing so by the above
; constraints should contact Don Wolfe, Assistant Vice-President for
; Computer Systems at Brown University, (401) 863-7250, for possible
; software licensing of the source developed at Brown.
;
; Brown University and Peter John DiCamillo make no representations
; about the suitability of this software for any purpose.
;
; BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
; EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
; INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
; WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
;
import sw_proc
import reqproc
import sndend
import nmend
export bgproc
export store_a5
export reqint
export GetA5
export sndproc
export nmproc
export nminstall
export nmremove
export Gestalt
export PPCInit
export ppcsync
export ppcasync
export PPCBROWSER
saveregs reg a0-a6/d0-d7
CurrentA5 equ $904 ; current value of A5 [pointer]
bgproc proc
movem.l saveregs,-(sp) ;save registers
move.l (a1),a1 ;a1 = pcb handle
move.l (a1),a1 ;a1 -> pcb
move.l 332(a1),a5 ;restore pointer to globals
jsr sw_proc ;call C processing code
movem.l (sp)+,saveregs ;restore registers
rts
endproc
sndproc proc
movem.l saveregs,-(sp) ;save registers
move.l 64(sp),a5 ;a5 -> SndCommand
move.l 4(a5),a5 ;restore pointer to globals
jsr sndend ;call C processing code
movem.l (sp)+,saveregs ;restore registers
move.l (sp),8(sp) ;move return address
add.l #8,sp ;remove parameters from stack
rts ;return
endproc
nmproc proc
movem.l saveregs,-(sp) ;save registers
move.l 64(sp),a5 ;a5 -> NMrec
move.l 32(a5),a5 ;restore pointer to globals
move.l 64(sp),-(sp) ;push parameter
jsr nmend ;call C processing code
move.l (sp)+,a5 ;pop parameter
movem.l (sp)+,saveregs ;restore registers
move.l (sp),4(sp) ;move return address
add.l #4,sp ;remove parameter from stack
rts ;return
endproc
store_a5 proc
move.l 4(sp),a0 ; get address parameter
add.l #48,a0 ; point to end of block
move.l a5,(a0) ; store a5 there
rts
endproc
GetA5 proc
move.l a5,d0 ; store old A5 as function result
rts
endproc
reqint proc
movem.l saveregs,-(sp) ;save registers
move.l 48(a0),a5 ;restore a5 from parm. block
jsr reqproc ;call interrupt handler
movem.l (sp)+,saveregs ;restore registers
rts
endproc
nminstall proc
move.l 4(sp),a0 ; get pointer parameter
dc.w $a05e ; call NMInstall trap
rts ; return
endproc
nmremove proc
move.l 4(sp),a0 ; get pointer parameter
dc.w $a05f ; call NMRemove trap
rts ; return
endproc
Gestalt proc
move.l 4(sp),d0 ; get selector code
dc.w $a1ad ; call Gestalt trap
move.l 8(sp),a1 ; get response address
move.l a0,(a1) ; copy result back
rts ; return
endproc
PPCInit proc
moveq #0,d0 ; Init selector is 0
dc.w $a0dd ; call PPC trap
rts ; return
endproc
ppcsync proc
move.l 4(sp),d0 ; get selector code
move.l 8(sp),a0 ; get pb pointer
dc.w $a0dd ; call PPC trap
rts ; return
endproc
ppcasync proc
move.l 4(sp),d0 ; get selector code
move.l 8(sp),a0 ; get pb pointer
dc.w $a4dd ; call PPC trap
rts ; return
endproc
PPCBROWSER proc
link a6,#0
subq.l #2,sp
move.l 30(a6),-(sp)
move.l 26(a6),-(sp)
move.b 24(a6),-(sp)
move.l 20(a6),-(sp)
move.l 16(a6),-(sp)
move.l 12(a6),-(sp)
move.l 8(a6),-(sp)
move.w #$0d00,d0 ; selector
dc.w $a82b ; Pack9
move.w (sp)+,d0
move.w d0,34(a6)
unlk a6
movea.l (sp)+,a0
add.w #26,sp
jmp (a0)
endproc
end